<style type="text/css" ">
.poll-bar,.poll-foreground{height:15px;}
.poll-bar{background:#eee;}
.poll-foreground{background-color: #0e90d2;
  background-image: -moz-linear-gradient(top, #149bdf, #0480be);
  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#149bdf), to(#0480be));
  background-image: -webkit-linear-gradient(top, #149bdf, #0480be);
  background-image: -o-linear-gradient(top, #149bdf, #0480be);
  background-image: linear-gradient(to bottom, #149bdf, #0480be);
  background-repeat: repeat-x;
  filter: progid:dximagetransform.microsoft.gradient(startColorstr='#ff149bdf', endColorstr='#ff0480be', GradientType=0);
  -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15);
     -moz-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15);
          box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15);
  -webkit-box-sizing: border-box;
     -moz-box-sizing: border-box;
          box-sizing: border-box;
  -webkit-transition: width 0.6s ease;
     -moz-transition: width 0.6s ease;
       -o-transition: width 0.6s ease;
          transition: width 0.6s ease;}
.poll-percent{float: right;}
.poll-text{display:inline;}
</style>

<?php foreach($polls as $poll): ?>
<div class="poll-text"><?php echo $poll['name'] ?></div>
<div class="poll-percent"><span style="margin:0 10px 0 0;"><?php echo $poll['num'] ?> คน</span><?php echo $poll['percent'] ?>%</div>
<div class="poll-bar"><div class="poll-foreground" style="width:<?php echo $poll['percent'] ?>%;"></div></div>
<?php endforeach; ?>